package com.baidu.ocrgeneralocrdemo.utils;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class ThreadUtil {

    private static ThreadPoolExecutor executor;

    static {
        executor = new ThreadPoolExecutor(5, 15,
                0L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
    }

    public static void submit(Runnable runnable) {
        executor.submit(runnable);
    }

    public static void remove(Runnable runnable) {
        executor.remove(runnable);
    }
}

